import 'package:flutter/material.dart';
import 'package:yuan_hang_app/utils/router_helper.dart';
import 'package:yuan_hang_app/views/home/view/activity/market_activity_page.dart';
import 'package:yuan_hang_app/views/home/view/book/book_manage_page.dart';
import 'package:yuan_hang_app/views/home/view/finance_compute_page.dart';
import 'package:yuan_hang_app/views/home/view/leads/defeat_audit_page.dart';
import 'package:yuan_hang_app/views/home/view/leads/defeat_leads_pool_page.dart';
import 'package:yuan_hang_app/views/home/view/leads/leads_assign_page.dart';
import 'package:yuan_hang_app/views/home/view/leads/leads_follow_up_page.dart';
import 'package:yuan_hang_app/views/home/view/leads/leads_record_page.dart';
import 'package:yuan_hang_app/views/home/view/order/order_manager_page.dart';
import 'package:yuan_hang_app/views/home/view/order/sales_order_list_page.dart';
import 'package:yuan_hang_app/views/home/view/store/store_manager_page.dart';
import 'package:yuan_hang_app/widget/w_toast.dart';
import '../views/home/view/drive/drive_feedback_page.dart';
import '../views/home/view/drive/trial_drive_page.dart';
import '../views/home/view/leads/leads_pool_page.dart';

class MenuHelper {
  static void menuRoute(String title, BuildContext context) {
    if (title == "线索池") {
      RouteHelper.pushWidget(context, const LeadsPoolPage());
    } else if (title == "线索分配") {
      RouteHelper.pushWidget(context, const LeadsAssignPage());
    } else if (title == "线索登记") {
      RouteHelper.pushWidget(context, const LeadsRecordPage());
    } else if (title == "线索管理") {
      RouteHelper.pushWidget(context, const LeadsFollowUpPage());
    } else if (title == "战败审核") {
      RouteHelper.pushWidget(context, const DefeatAuditPage());
    } else if (title == "战败线索池") {
      RouteHelper.pushWidget(context, const DefeatLeadsPoolPage());
    }else if (title == "预约管理") {
      RouteHelper.pushWidget(context, const BookManagePage());
    } else if (title == "试驾管理") {
      RouteHelper.pushWidget(context, const TrialDrivePage());
    }
    // else if(title == "试驾登记"){
    //   RouteHelper.pushWidget(context, const DriveRegistrationPage());
    // }
    //
    else if (title == "试驾回访") {
      // RouteHelper.pushWidget(context,  const DrivalSignature());
      RouteHelper.pushWidget(context,  const DriveFeedBackPage());
    } else if (title == "市场活动") {
      RouteHelper.pushWidget(context,  const MarketActivityPage());
    } else if (title == "代客下单") {
      RouteHelper.pushWidget(context, const OrderManagerPage());
    } else if (title == "金融计算器") {
      RouteHelper.pushWidget(context, const FinanceComputePage());
    } else if (title == "车辆库存") {
      RouteHelper.pushWidget(context, const StoreManagerPage());
    } else if (title == "订单查询") {
      RouteHelper.pushWidget(context, const SalesOrderListPage());
    }

    else {
      Toast.toast("暂未开放！");
    }
  }
}
